project('hello', 'cpp',
  version : '0.0.1',
  default_options : ['warning_level=3', 'cpp_std=c++20'])

src= [
  'hello.cpp'
]

incdir = include_directories('inc/')

cxx = meson.get_compiler('cpp')

# spdlog 依赖 fmt
fmt_dep = [
    cxx.find_library('fmt')
]

opencv_dep = [
    cxx.find_library('opencv_core'),
    cxx.find_library('opencv_imgcodecs'),
    cxx.find_library('opencv_highgui'),
    cxx.find_library('opencv_imgproc'),
    cxx.find_library('opencv_video'),
    cxx.find_library('opencv_videoio'),
    cxx.find_library('opencv_videostab'),
]

add_project_arguments(['-lstdc++', '-ldl', '-w', '-lm'], language : 'cpp')

# '.' will refer to current build directory
include_dirs = include_directories('.')


executable('hello',
           src,
           dependencies: [opencv_dep],
           include_directories : [include_dirs],
           #install : true
           implicit_include_directories: true
)
